<?php
require_once 'models/model_manager.php';

class user_manager extends Manager
{	
	public function exist($u) {
		$query = "SELECT * FROM admin WHERE login = '" . $u->get_login() . "'";
		$result = oci_parse($this->_db, $query);
		oci_execute($result);
	}
	
	public function is_admin($u) {
		$query = "SELECT * FROM admin WHERE login = '" . $u->get_login() . "' AND password = '" . $u->get_password() . "'";
		$result = oci_parse($this->_db, $query);
		oci_execute($result);
		oci_fetch_assoc($result);
		return oci_num_rows($result) == 1;
	}
}
?>
